<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>NATS C Client with Streaming support: Management</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;" >
   <div id="projectname">NATS C Client with Streaming support
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">The nats.io C Client, Supported by Synadia Communications Inc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__conn_mgt_group.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Management<div class="ingroups"><a class="el" href="group__func_group.html">Functions</a> &raquo; <a class="el" href="group__conn_group.html">Connection</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce">natsConnection_Connect</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *options)</td></tr>
<tr class="memdesc:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Server</code> using the provided options.  <a href="#ga740be1ba16a8570eb98ef6755ebf52ce">More...</a><br /></td></tr>
<tr class="separator:ga740be1ba16a8570eb98ef6755ebf52ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa89c06e30e19ff361125bfc9114d89a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaa89c06e30e19ff361125bfc9114d89a8">natsConnection_ProcessReadEvent</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:gaa89c06e30e19ff361125bfc9114d89a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process a read event when using external event loop.  <a href="#gaa89c06e30e19ff361125bfc9114d89a8">More...</a><br /></td></tr>
<tr class="separator:gaa89c06e30e19ff361125bfc9114d89a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad81b603b84c0180aefc6d5ebad7f2a47">natsConnection_ProcessWriteEvent</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Process a write event when using external event loop.  <a href="#gad81b603b84c0180aefc6d5ebad7f2a47">More...</a><br /></td></tr>
<tr class="separator:gad81b603b84c0180aefc6d5ebad7f2a47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4">natsConnection_ConnectTo</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **nc, const char *urls)</td></tr>
<tr class="memdesc:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to a <code>NATS Server</code> using any of the URL from the given list.  <a href="#gafb83c8d7970ba68be0e6c40c38cdfde4">More...</a><br /></td></tr>
<tr class="separator:gafb83c8d7970ba68be0e6c40c38cdfde4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga530f0f1c75c58a81aae1a59f15b46d9f">natsConnection_IsClosed</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection has been closed.  <a href="#ga530f0f1c75c58a81aae1a59f15b46d9f">More...</a><br /></td></tr>
<tr class="separator:ga530f0f1c75c58a81aae1a59f15b46d9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5aa349fc3895dde772671b324b07a688"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga5aa349fc3895dde772671b324b07a688">natsConnection_IsReconnecting</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga5aa349fc3895dde772671b324b07a688"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection is reconnecting.  <a href="#ga5aa349fc3895dde772671b324b07a688">More...</a><br /></td></tr>
<tr class="separator:ga5aa349fc3895dde772671b324b07a688"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga15a0f8aa9a6f621535d01593a4c8edd5">natsConnection_IsDraining</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if connection is draining.  <a href="#ga15a0f8aa9a6f621535d01593a4c8edd5">More...</a><br /></td></tr>
<tr class="separator:ga15a0f8aa9a6f621535d01593a4c8edd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga33fa209522e5e0226b5b7c7d720a3b98">natsConnection_Status</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current state of the connection.  <a href="#ga33fa209522e5e0226b5b7c7d720a3b98">More...</a><br /></td></tr>
<tr class="separator:ga33fa209522e5e0226b5b7c7d720a3b98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0433159e518540ff874c4026fe9cd0c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga0433159e518540ff874c4026fe9cd0c5">natsConnection_Buffered</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga0433159e518540ff874c4026fe9cd0c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of bytes to be sent to the server.  <a href="#ga0433159e518540ff874c4026fe9cd0c5">More...</a><br /></td></tr>
<tr class="separator:ga0433159e518540ff874c4026fe9cd0c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f">natsConnection_Flush</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes the connection.  <a href="#ga1c98f8d89bb8e20ea8621e860a90267f">More...</a><br /></td></tr>
<tr class="separator:ga1c98f8d89bb8e20ea8621e860a90267f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga85915ef0c8b87993be1b076099d6a7c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga85915ef0c8b87993be1b076099d6a7c1">natsConnection_FlushTimeout</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout)</td></tr>
<tr class="memdesc:ga85915ef0c8b87993be1b076099d6a7c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flushes the connection with a given timeout.  <a href="#ga85915ef0c8b87993be1b076099d6a7c1">More...</a><br /></td></tr>
<tr class="separator:ga85915ef0c8b87993be1b076099d6a7c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga68e7149f7ff1cc4989b3f795fa7e76d9">natsConnection_GetMaxPayload</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum message payload.  <a href="#ga68e7149f7ff1cc4989b3f795fa7e76d9">More...</a><br /></td></tr>
<tr class="separator:ga68e7149f7ff1cc4989b3f795fa7e76d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga68821a8ae1176096b5afef7fdc7947ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga68821a8ae1176096b5afef7fdc7947ec">natsConnection_GetStats</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *stats)</td></tr>
<tr class="memdesc:ga68821a8ae1176096b5afef7fdc7947ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the connection statistics.  <a href="#ga68821a8ae1176096b5afef7fdc7947ec">More...</a><br /></td></tr>
<tr class="separator:ga68821a8ae1176096b5afef7fdc7947ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf623280407c43ade02285005f0642e6d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaf623280407c43ade02285005f0642e6d">natsConnection_GetConnectedUrl</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char *buffer, size_t bufferSize)</td></tr>
<tr class="memdesc:gaf623280407c43ade02285005f0642e6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the URL of the currently connected server.  <a href="#gaf623280407c43ade02285005f0642e6d">More...</a><br /></td></tr>
<tr class="separator:gaf623280407c43ade02285005f0642e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">natsConnection_GetConnectedServerId</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char *buffer, size_t bufferSize)</td></tr>
<tr class="memdesc:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the server Id.  <a href="#ga48cee9ea1cdc9fc2770de2f9f0fd1ccf">More...</a><br /></td></tr>
<tr class="separator:ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b">natsConnection_GetServers</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char ***servers, int *count)</td></tr>
<tr class="memdesc:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of server URLs known to this connection.  <a href="#gaf4ee7262e35e44c40ad5dfe9240db76b">More...</a><br /></td></tr>
<tr class="separator:gaf4ee7262e35e44c40ad5dfe9240db76b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad25c77be0873495412c90a73fe450708"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gad25c77be0873495412c90a73fe450708">natsConnection_GetDiscoveredServers</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, char ***servers, int *count)</td></tr>
<tr class="memdesc:gad25c77be0873495412c90a73fe450708"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the list of discovered server URLs.  <a href="#gad25c77be0873495412c90a73fe450708">More...</a><br /></td></tr>
<tr class="separator:gad25c77be0873495412c90a73fe450708"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gab6cfa9cb6857ae10f096a94f5e244e63">natsConnection_GetLastError</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const char **lastError)</td></tr>
<tr class="memdesc:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the last connection error.  <a href="#gab6cfa9cb6857ae10f096a94f5e244e63">More...</a><br /></td></tr>
<tr class="separator:gab6cfa9cb6857ae10f096a94f5e244e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga747513ba6ab63fdf9a72bfc8025a14ba">natsConnection_GetClientID</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, uint64_t *cid)</td></tr>
<tr class="memdesc:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the current client ID assigned by the server.  <a href="#ga747513ba6ab63fdf9a72bfc8025a14ba">More...</a><br /></td></tr>
<tr class="separator:ga747513ba6ab63fdf9a72bfc8025a14ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b">natsConnection_Drain</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the connection with default timeout.  <a href="#ga59bdc4ad9fea2053f5d3841f6b83f88b">More...</a><br /></td></tr>
<tr class="separator:ga59bdc4ad9fea2053f5d3841f6b83f88b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae06fe6f5933f216d6d93645a122a7dd4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4">natsConnection_DrainTimeout</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, int64_t timeout)</td></tr>
<tr class="memdesc:gae06fe6f5933f216d6d93645a122a7dd4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Drains the connection with given timeout.  <a href="#gae06fe6f5933f216d6d93645a122a7dd4">More...</a><br /></td></tr>
<tr class="separator:gae06fe6f5933f216d6d93645a122a7dd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6960cfdbaac3b8759784f352d4c264f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga6960cfdbaac3b8759784f352d4c264f8">natsConnection_Sign</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc, const unsigned char *message, int messageLen, unsigned char sig[64])</td></tr>
<tr class="memdesc:ga6960cfdbaac3b8759784f352d4c264f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signs any 'message' using the connection's user credentials.  <a href="#ga6960cfdbaac3b8759784f352d4c264f8">More...</a><br /></td></tr>
<tr class="separator:ga6960cfdbaac3b8759784f352d4c264f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga19e204d27a232e2d4334301fc002b2ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#ga19e204d27a232e2d4334301fc002b2ed">natsConnection_Close</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:ga19e204d27a232e2d4334301fc002b2ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Closes the connection.  <a href="#ga19e204d27a232e2d4334301fc002b2ed">More...</a><br /></td></tr>
<tr class="separator:ga19e204d27a232e2d4334301fc002b2ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafda2f702276fb0ac301efac10df09495"><td class="memItemLeft" align="right" valign="top"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495">natsConnection_Destroy</a> (<a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *nc)</td></tr>
<tr class="memdesc:gafda2f702276fb0ac301efac10df09495"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the connection object.  <a href="#gafda2f702276fb0ac301efac10df09495">More...</a><br /></td></tr>
<tr class="separator:gafda2f702276fb0ac301efac10df09495"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Functions related to connection management. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga740be1ba16a8570eb98ef6755ebf52ce"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Connect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e">natsOptions</a> *&#160;</td>
          <td class="paramname"><em>options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attempts to connect to a <code>NATS Server</code> with multiple options.</p>
<p>This call is cloning the <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object. Once this call returns, changes made to the <code>options</code> will not have an effect to this connection. The <code>options</code> can however be changed prior to be passed to another <a class="el" href="group__conn_mgt_group.html#ga740be1ba16a8570eb98ef6755ebf52ce" title="Connects to a NATS Server using the provided options. ">natsConnection_Connect()</a> call if desired.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> </dd>
<dd>
<a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495" title="Destroys the connection object. ">natsConnection_Destroy()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">options</td><td>the options to use for this connection. If <code>NULL</code> this call is equivalent to <a class="el" href="group__conn_mgt_group.html#gafb83c8d7970ba68be0e6c40c38cdfde4" title="Connects to a NATS Server using any of the URL from the given list. ">natsConnection_ConnectTo()</a> with <a class="el" href="nats_8h.html#a911c54900b46b968205871cd9f68d36c" title="The default NATS Server URL. ">NATS_DEFAULT_URL</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa89c06e30e19ff361125bfc9114d89a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_ProcessReadEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>When using an external event loop, and the callback indicating that the socket is ready for reading, this call will read data from the socket and process it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>This API is reserved for external event loop adapters. </dd></dl>

</div>
</div>
<a class="anchor" id="gad81b603b84c0180aefc6d5ebad7f2a47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_ProcessWriteEvent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>When using an external event loop, and the callback indicating that the socket is ready for writing, this call will write data to the socket.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>This API is reserved for external event loop adapters. </dd></dl>

</div>
</div>
<a class="anchor" id="gafb83c8d7970ba68be0e6c40c38cdfde4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_ConnectTo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> **&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>urls</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Attempts to connect to a <code>NATS Server</code>.</p>
<p>This call supports multiple comma separated URLs. If more than one is specified, it behaves as if you were using a <a class="el" href="group__types_group.html#gabcc48b40a81fe302188f4ee06ea9c54e" title="Way to configure a natsConnection. ">natsOptions</a> object and called <a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers()</a> with the equivalent array of URLs. The list is randomized before the connect sequence starts.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495" title="Destroys the connection object. ">natsConnection_Destroy()</a> </dd>
<dd>
<a class="el" href="group__opts_group.html#gacb7e964ae54b74d972d72e118b7b8bdf" title="Set the list of servers to try to (re)connect to. ">natsOptions_SetServers()</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the location where to store the pointer to the newly created <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">urls</td><td>the URL to connect to, or the list of URLs to chose from. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga530f0f1c75c58a81aae1a59f15b46d9f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool natsConnection_IsClosed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tests if connection has been closed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga5aa349fc3895dde772671b324b07a688"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> bool natsConnection_IsReconnecting </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tests if connection is reconnecting.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga15a0f8aa9a6f621535d01593a4c8edd5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool natsConnection_IsDraining </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Tests if connection is draining.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga33fa209522e5e0226b5b7c7d720a3b98"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51">natsConnStatus</a> natsConnection_Status </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the current state of the connection.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51" title="The connection state. ">natsConnStatus</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0433159e518540ff874c4026fe9cd0c5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int natsConnection_Buffered </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>When calling any of the publish functions, data is not necessarily immediately sent to the server. Some buffering occurs, allowing for better performance. This function indicates if there is any data not yet transmitted to the server.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes to be sent to the server, or -1 if the connection is closed. </dd></dl>

</div>
</div>
<a class="anchor" id="ga1c98f8d89bb8e20ea8621e860a90267f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Flush </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Performs a round trip to the server and return when it receives the internal reply.</p>
<p>Note that if this call occurs when the connection to the server is lost, the <code>PING</code> will not be echoed even if the library can connect to a new (or the same) server. Therefore, in such situation, this call will fail with the status <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80abef517217119e8446a8e3382e1f37eb3">NATS_CONNECTION_DISCONNECTED</a>.</p>
<p>If the connection is closed while this call is in progress, then the status <a class="el" href="status_8h.html#a6d667c1f8dd289a7e0f39bf10e800b51aa78753a4de2d0379078bb09cdc1acdb2" title="The connection is closed. ">NATS_CONN_STATUS_CLOSED</a> would be returned instead.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga85915ef0c8b87993be1b076099d6a7c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_FlushTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Performs a round trip to the server and return when it receives the internal reply, or if the call times-out (timeout is expressed in milliseconds).</p>
<p>See possible failure case described in <a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f" title="Flushes the connection. ">natsConnection_Flush()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">timeout</td><td>in milliseconds, is the time allowed for the flush to complete before <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80ab88994c9ea9889ac4d9d656d62f550ed">NATS_TIMEOUT</a> error is returned. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga68e7149f7ff1cc4989b3f795fa7e76d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> int64_t natsConnection_GetMaxPayload </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the maximum message payload accepted by the server. The information is gathered from the <code>NATS Server</code> when the connection is first established.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the maximum message payload. </dd></dl>

</div>
</div>
<a class="anchor" id="ga68821a8ae1176096b5afef7fdc7947ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetStats </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa">natsStatistics</a> *&#160;</td>
          <td class="paramname"><em>stats</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies in the provided statistics structure, a snapshot of the statistics for this connection.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">stats</td><td>the pointer to a <a class="el" href="group__types_group.html#ga57a4b8c7109e2773878655722ce028aa" title="Statistics of a natsConnection. ">natsStatistics</a> object in which statistics will be copied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf623280407c43ade02285005f0642e6d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetConnectedUrl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufferSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies in the given buffer, the connected server's Url. If the buffer is too small, an error is returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer in which the URL is copied. </td></tr>
    <tr><td class="paramname">bufferSize</td><td>the size of the buffer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga48cee9ea1cdc9fc2770de2f9f0fd1ccf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetConnectedServerId </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>bufferSize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Copies in the given buffer, the connected server's Id. If the buffer is too small, an error is returned.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer in which the server id is copied. </td></tr>
    <tr><td class="paramname">bufferSize</td><td>the size of the buffer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf4ee7262e35e44c40ad5dfe9240db76b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetServers </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char ***&#160;</td>
          <td class="paramname"><em>servers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the list of known servers, including additional servers discovered after a connection has been established (with servers version 0.9.2 and above).</p>
<p>No credential information is included in any of the server URLs returned by this call.<br />
 If you want to use any of these URLs to connect to a server that requires authentication, you will need to use <a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL. ">natsOptions_SetUserInfo</a> or <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a>.</p>
<dl class="section note"><dt>Note</dt><dd>The user is responsible for freeing the memory of the returned array.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">servers</td><td>the location where to store the pointer to the array of server URLs. </td></tr>
    <tr><td class="paramname">count</td><td>the location where to store the number of elements of the returned array. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gad25c77be0873495412c90a73fe450708"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetDiscoveredServers </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char ***&#160;</td>
          <td class="paramname"><em>servers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Unlike <a class="el" href="group__conn_mgt_group.html#gaf4ee7262e35e44c40ad5dfe9240db76b" title="Returns the list of server URLs known to this connection. ">natsConnection_GetServers</a>, this function only returns the list of servers that have been discovered after the a connection has been established (with servers version 0.9.2 and above).</p>
<p>No credential information is included in any of the server URLs returned by this call.<br />
 If you want to use any of these URLs to connect to a server that requires authentication, you will need to use <a class="el" href="group__opts_group.html#ga5b99da7dd74aac3be962f323c3863d9e" title="Sets the user name/password to use when not specified in the URL. ">natsOptions_SetUserInfo</a> or <a class="el" href="group__opts_group.html#gad58a5b9dabadeebda30e952ff7b39193" title="Sets the token to use when not specified in the URL. ">natsOptions_SetToken</a>.</p>
<dl class="section note"><dt>Note</dt><dd>The user is responsible for freeing the memory of the returned array.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">servers</td><td>the location where to store the pointer to the array of server URLs. </td></tr>
    <tr><td class="paramname">count</td><td>the location where to store the number of elements of the returned array. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gab6cfa9cb6857ae10f096a94f5e244e63"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetLastError </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char **&#160;</td>
          <td class="paramname"><em>lastError</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the last known error as a 'natsStatus' and the location to the null-terminated error string.</p>
<dl class="section warning"><dt>Warning</dt><dd>The returned string is owned by the connection object and must not be freed.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">lastError</td><td>the location where the pointer to the connection's last error string is copied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga747513ba6ab63fdf9a72bfc8025a14ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_GetClientID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint64_t *&#160;</td>
          <td class="paramname"><em>cid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns the client ID assigned by the server to which the client is currently connected to.</p>
<dl class="section note"><dt>Note</dt><dd>The value may change if the client reconnects.</dd></dl>
<p>This function returns <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80a8a4e298931ba0698a72e397b1b57c885" title="The server does not support this action. ">NATS_NO_SERVER_SUPPORT</a> if the server's version is less than 1.2.0.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">cid</td><td>the location where to store the client ID. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga59bdc4ad9fea2053f5d3841f6b83f88b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Drain </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Drain will put a connection into a drain state. All subscriptions will immediately be put into a drain state. Upon completion, the publishers will be drained and can not publish any additional messages. Upon draining of the publishers, the connection will be closed. Use the <a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost. ">natsOptions_SetClosedCB()</a> option to know when the connection has moved from draining to closed.</p>
<p>This call uses a default drain timeout of 30 seconds.</p>
<dl class="section warning"><dt>Warning</dt><dd>This function does not block waiting for the draining operation to complete.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost. ">natsOptions_SetClosedCB</a> </dd>
<dd>
<a class="el" href="group__conn_mgt_group.html#gae06fe6f5933f216d6d93645a122a7dd4" title="Drains the connection with given timeout. ">natsConnection_DrainTimeout</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gae06fe6f5933f216d6d93645a122a7dd4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_DrainTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int64_t&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Identical to <a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b" title="Drains the connection with default timeout. ">natsConnection_Drain</a> but the timeout can be specified here.</p>
<p>The value is expressed in milliseconds. Zero or negative value means that the operation will not timeout.</p>
<dl class="section warning"><dt>Warning</dt><dd>This function does not block waiting for the draining operation to complete.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__opts_group.html#ga44410242e73134e5bb51ef27904a9253" title="Sets the callback to be invoked when a connection to a server is permanently lost. ">natsOptions_SetClosedCB</a> </dd>
<dd>
<a class="el" href="group__conn_mgt_group.html#ga59bdc4ad9fea2053f5d3841f6b83f88b" title="Drains the connection with default timeout. ">natsConnection_Drain</a></dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">timeout</td><td>the allowed time for a drain operation to complete, expressed in milliseconds. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga6960cfdbaac3b8759784f352d4c264f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> <a class="el" href="status_8h.html#a36c934157b663b7b5fb5d6609c897c80">natsStatus</a> natsConnection_Sign </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>messageLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sig</em>[64]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The connection must have been created with the <a class="el" href="group__opts_group.html#ga59b47f7b7a19085cf8eaada9bfe5606e" title="Sets the file(s) to use to fetch user JWT and see required to sign nonce. ">natsOptions_SetUserCredentialsFromFiles</a>.</p>
<p>This call will sign the given message with the private key extracted through the user credentials file(s).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
    <tr><td class="paramname">message</td><td>the byte array to sign. </td></tr>
    <tr><td class="paramname">messageLen</td><td>the length of the given byte array. </td></tr>
    <tr><td class="paramname">sig</td><td>an array of 64 bytes in which the signature will be copied. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga19e204d27a232e2d4334301fc002b2ed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_Close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Closes the connection to the server. This call will release all blocking calls, such as <a class="el" href="group__conn_mgt_group.html#ga1c98f8d89bb8e20ea8621e860a90267f" title="Flushes the connection. ">natsConnection_Flush()</a> and <a class="el" href="group__sub_group.html#ga6538a5d78dfb0f16514b94c8e74c11af" title="Returns the next available message. ">natsSubscription_NextMsg()</a>. The connection object is still usable until the call to <a class="el" href="group__conn_mgt_group.html#gafda2f702276fb0ac301efac10df09495" title="Destroys the connection object. ">natsConnection_Destroy()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gafda2f702276fb0ac301efac10df09495"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="nats_8h.html#a3bc1b3fe7f64083e60c7c3b93f205bad">NATS_EXTERN</a> void natsConnection_Destroy </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec">natsConnection</a> *&#160;</td>
          <td class="paramname"><em>nc</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Destroys the connection object, freeing up memory. If not already done, this call first closes the connection to the server.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">nc</td><td>the pointer to the <a class="el" href="group__types_group.html#gaf88dca0a18efb5c5e994d265a9f04aec" title="A connection to a NATS Server. ">natsConnection</a> object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">NATS.IO Supported By Synadia Communications Inc.
    <a href="http://www.nats.io">
    </a></li>
  </ul>
</div>
</body>
</html>
